<template>
	<!-- head标题 -->
	<view class="activity-box">
		<block v-if="labelList">
			<view class="activity-head" v-for="(item,index) in labelList" @click="getTab(item,index)">
				<!-- 渐变色 -->
				<view class="activity-head-lab" v-if="labelId===index"></view>
				<view :class="labelId===index?'activity-titled':'activity-title'" :style="size?size:''">
					{{item.name}}
				</view>
			</view>
		</block>
	</view>
</template>
<script>
	export default {
		name: 'z-label',
		props: ['size', 'labelList', 'labelId'],
		data() {
			return {}
		},
		methods:{
			getTab(item,index){
				this.$emit('getTab',{item:item,index:index})
			}
		}
	
	}
</script>
<style lang="scss">
	// 活动模块
	.activity-box {
		width: 690rpx;
		margin: 0 auto;
		display: flex;
		align-items: center;
		justify-content: space-between;
		// position: relative;

		.activity-head {
			position: relative;
			// width: 260rpx;
			// background-color: red;
			height: 50rpx;
			position: relative;
			.activity-head-lab {
				width: 62rpx;
				height: 62rpx;
				// margin-left: 14rpx;
				opacity: 1;
				will-change: transform, filter;
				position: absolute;
				left: -15rpx;
				border-radius: 50rpx;
				background: linear-gradient(128.84deg, rgba(253, 145, 200, 1) 0%, rgba(255, 255, 255, 0) 100%);
				filter: blur(20rpx);
			}

			.activity-titled {
				font-size: 36rpx;
				// position: absolute;
				// top: 10rpx;
				// display: flex;
				// align-items: center;
				// left: 36rpx;
				filter: blur(0);
				font-weight: 500;
				letter-spacing: 0px;
				color: rgba(0, 0, 0, 1);
				text-align: left;
				vertical-align: top;

				.icon {
					width: 28rpx;
					margin-left: 8rpx;
					height: 28rpx;
					object-fit: cover;
				}
			}

			.activity-title {
				font-size: 36rpx;
				// position: absolute;
				// top: 10rpx;
				// display: flex;
				// align-items: center;
				// left: 36rpx;
				filter: blur(0);
				letter-spacing: 0px;
				color: rgba(0, 0, 0, 1);
				text-align: left;
				vertical-align: top;

				.icon {
					width: 28rpx;
					margin-left: 8rpx;
					height: 28rpx;
					object-fit: cover;
				}
			}
		}


	}
</style>